package domain;

/* Interface GeneralDomainClass
 * ---------------------------------
 * The interface that every domain/model class should implement.
 * Contains methods that are accessed from a DatabaseHandler - something like an implementation of 
 * the Bridge GOF pattern
 * 
 * @author: Ivan Ivic
 */
public interface IGeneralDomainObject {

	// returns the table name
	public abstract String getTableName();

	// returns the search condition for database query
	// Client should first call specific class searchCondition, to set the
	// condition for database query.
	public abstract String getSearchCondition();

	/**
	 * 
	 * @return String for usage by database handler for insert sql statement.
	 *         Should contain values that must be inserted into table, without
	 *         parenthesis. <br><br> <b>For example:</b><br> return "libraryName='" + getLibraryName() + "'";
	 */
	public abstract String getInsertValues();
	
	/**
	 * 
	 * @return String[] that represents the columns' names in the database for objects of this class.
	 */
	public abstract String[] getColumnsNames();
	
	/**
	 * 
	 * @return String representing simple name of the table, ie 'TLibrary'
	 */
	public abstract String getSimpleTableName();
	
}
